package extension

inline fun Boolean.ifTrue(operate: () -> Unit): Boolean {
  //  this 关键字在扩展函数内部对应到接收者对象
  if (this) operate()
  return this
}

inline fun Boolean.ifFalse(operate: () -> Unit): Boolean {
  if (!this) operate()
  return this
}